<?php
include_only();

$subtitles = get_all_subtitles();
//print_r($subtitles);

$finished_subtitles = "
<table>
<tr>
<td>#</td>
<td><b>subtitle name</b></td>
<td><b>language</b></td>
<td><b>Download</b></td>
</tr>";

for ($i = 0; $i <= count($subtitles)-1; $i++) {
$index = $i + 1 ;
$lang = get_language_by_id($subtitles[$i]['language']);
$lang_name = $lang['name'];
$finished_subtitles = $finished_subtitles . "
<tr>
<td>".$index."</td>
<td><b>".$subtitles[$i]['title']."</b></td>
<td><b>".$lang_name."</b></td>
<td><b><a href='download_subtitle.php?page=finished_subtitles&subtitle_id=".$subtitles[$i]['id']."'>Download</a></b></td>
</tr>
";    
}

$finished_subtitles = $finished_subtitles . "
</table>
";
?>

<!--
	<form method='get' action='download_subtitle.php'>
	<input type='hidden' name='page' value='edit_subtitle_info' />
	<input type='hidden'  name='subtitle_id' value="<?php if(!empty($all_user_subtitles[$i]['id'])){echo $all_user_subtitles[$i]['id'];} ?>" />
	<input type='image' src='templates/<?php echo read_option('theme_folder');?>/control/download.png' title='Download' />
	</form>
-->